﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using IrisGenerator.Common.DataTypes;
using IrisGenerator.Common.DataTypes.Rules;
using IrisGenerator.Common.Core;
//using IrisGenerator.Common.Core.Rules;
using IrisGenerator.Common.UI.Controls;
using IrisGenerator.Common.UI.XmlConfiguration;

using IrisGenerator.Framework.Reflection;
using IrisGenerator.Framework.UI.Controls;


namespace IrisGenerator.Common.UI.Controls.DataGrids
{
    public partial class MetatypeDataGrid : BindableDataGrid<Metatype>
    {

        /// <summary>
        /// .ctor
        /// </summary>
        public MetatypeDataGrid():base()
        {
            
            this.SourceMethod = new MethodCall();
            this.SourceMethod.MethodName = "GetAll";
            this.SourceMethod.TypeName = "IrisGenerator.Common.DataTypes.Metatype";
            this.SourceMethod.ParentType = Type.GetType(this.SourceMethod.TypeName);
            this.BindingType = "IrisGenerator.Common.DataTypes.MetatypeCollection";
            
            InitializeGrid();
            
        }

        private void InitializeGrid()
        {
            this.Name = "Metatypes";
            this.AutoGenerateColumns = false;
            XmlConfigFileReader.ConfigFilePath = @"C:\Personnel\Developpement\Code Generator 2008\IrisGenerator\IrisGenerator.Common\ControlsConfigFile.xml";
            XmlConfiguration.XmlConfigFileReader.LoadConfiguration(this);

        }

        
       
    }
}
